package com.ruoyi.logistic.service.impl;

import com.github.pagehelper.PageHelper;
import com.ruoyi.logistic.domain.NetworkSheetPriceClient;
import com.ruoyi.logistic.domain.PageDate;
import com.ruoyi.logistic.domain.vo.NetworkSheetPriceClientVo;
import com.ruoyi.logistic.mapper.NetworkSheetPriceClientMapper;
import com.ruoyi.logistic.service.NetworkSheetPriceClientService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class NetworkSheetPriceClientServiceImpl implements NetworkSheetPriceClientService {
    @Autowired
    private NetworkSheetPriceClientMapper networkSheetPriceClientMapper;
    @Override
    public List<NetworkSheetPriceClient> selectAll(PageDate pageDate) {
        PageHelper.startPage(pageDate);
        return networkSheetPriceClientMapper.selectAll();
    }

    @Override
    public Boolean insert(NetworkSheetPriceClient networkSheetPriceClient) {
        return networkSheetPriceClientMapper.insert(networkSheetPriceClient);
    }

    @Override
    public Boolean update(NetworkSheetPriceClient networkSheetPriceClient) {
        return networkSheetPriceClientMapper.update(networkSheetPriceClient);
    }

    @Override
    public Boolean deleteById(Integer id) {
        return networkSheetPriceClientMapper.deleteById(id);
    }

    @Override
    public NetworkSheetPriceClient findById(Integer id) {
        return networkSheetPriceClientMapper.findById(id);
    }

    @Override
    public List<NetworkSheetPriceClient> search(NetworkSheetPriceClientVo networkSheetPriceClientVo) {

        PageHelper.startPage(networkSheetPriceClientVo.getPageDate());
        return networkSheetPriceClientMapper.search(networkSheetPriceClientVo);
    }


    @Override
    public Integer updateList(List<NetworkSheetPriceClient> list) {
        return networkSheetPriceClientMapper.updateList(list);
    }
}
